from celery_task.main import celery_app
from celery_task.sms.yuntongxun.sms import CCP
from celery_task.sms import contains

@celery_app.task(name = 'sms_task')
def send_code(mobile,sms_code):
    # 发送验证码  成功返回0，失败返回-1
    sms_result = CCP().send_template_sms(mobile, [sms_code, contains.SMS_CODE_TIME // 60], 1)
    return sms_result